<template>
	<view>
		<view class="fixbox" :style="{ height: fixboxHeight + 'px' }">
		  <view class="fix">
		    <top-status></top-status>
		    <view class="tabs">
		      我的
		    </view>
		  </view>
		</view>
		<view class="load" v-if="!load">
			<view style="text-align: center">正在加载...</view>
			<!-- <u-loading-icon mode="circle" inactive-color="#fff" text="正在加载..." vertical></u-loading-icon> -->
		</view>
		<view v-else style="height: 100vh; overflow: hidden">
			<x-scroll :fixed="true" :isNav="false" @onRefresh="onRefresh" @scrolltolower="scrolltolower" :refresh="$data._freshing">
				<view v-if="!isspread && user.IsAuth == 1" class="user_tips1" @click="nav_to('/pages/user/spread')">
					邀请用户注册送七天会员
					<image @click.stop="delspr" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/chat/del.png" mode="widthFix"></image>
				</view>
				<view class="user_tips" v-if="user.IsAuth == 0" @click="nav_to('/pages/start/start2')">注册会员可免费获得7天金卡会员</view>
				<!-- <view class="user_tips" v-else-if="user.IsAuth==1&&!user.WechatNo" @click="nav_to('/pages/user/user_edit')">
					完善个人资料，可以获得1000积分
				</view> -->
				<view class="wap">
					<view class="user_info">
						<view class="cover">
							<image v-if="user.IsAuth == 0" class="userimg" :src="ossPath + '/upload/17115029998101214.png'"></image>
							<image v-else class="userimg" :src="user.HeadImgUrl" mode="aspectFill" @click="nav_to('/pages/user/user_edit')" />
							<view v-if="user.Tag == '教练'" class="coachbox">
								<!-- <text class="autext">教练</text> -->
								<image class="coachimg" :src="ossPath + '/upload/1710904474666454.png'"></image>
							</view>
							<view v-if="user.Tag == '星助教'" class="assbox">
								<!-- <text class="autext">星助教</text> -->
								<image class="assistantimg" :src="ossPath + '/upload/1710904456266854.png'"></image>
							</view>
						</view>
						<view class="info" v-if="user.IsAuth == 1">
							<view class="name" @click="nav_to('/pages/user/user_edit')">
								<view class="f1 c1 f1 c1 name_text u-line-1">{{ user.Name ? $util.entitiesToUtf16(user.Name) : '' }}</view>
								<!-- <view class="real" v-if="IsTrueName">
									<image class="realimg"
										:src="ossPath+'/upload/1711013855072316.png'"	mode="" />
								</view> -->
								<view v-if="user.UserType != '普通用户'" class="huiyuanbox">
									<!-- <image class="vimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711003946324159.png"></image> -->
		
									<image
										v-if="user.UserType == '体验会员'"
										class="vipiconimg"
										src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1712643203782247.png"
									></image>
		
									<image
										class="vipiconimg"
										v-if="user.UserType == '金卡会员'"
										src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1744792231023643.png"
									></image>
									<image
										class="vipiconimg"
										v-if="user.UserType == '月卡会员'"
										src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17210069430311410.png"
									></image>
		
									<image
										class="vipiconimg"
										v-if="user.UserType == '年卡会员'"
										src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1712643305959214.png"
									></image>
		
									<image
										class="vipiconimg"
										v-if="user.UserType == '黑金卡会员'"
										src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1712643305959214.png"
									></image>
		
									<image
										class="vipiconimg"
										v-if="user.UserType == '黑金年卡会员'"
										src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1744792207318376.png"
									></image>
								</view>
								<!-- <view class="dengji">
									<image class="dengjiimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1712643557652633.png"></image>
									<view class="Wealthtext">LV{{user.MemberWealth.WealthLevel}}</view>
								</view> -->
							</view>
							<view class="signature">
								<view class="vID">ID号：{{ user.ID }}</view>
								<view class="qr_b" @click="nav_to('/pages/user/my_qr')">
									<image class="qr_bimg" src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17202349278101452.png"></image>
								</view>
								<!-- <view v-if="user.Tag == null || user.Tag == ''"  class="authenticabox" @click="nav_to('/pages/teacher/authentica')">
									<text class="autext">认证</text>
									<image class="auimg" :src="ossPath+'/upload/1712643970805552.png'"></image>
								</view> -->
								<view class="setting_btn" v-if="user.IsAuth == 1" @click="nav_to('/pages/user/user_edit')">
									<text>编辑资料</text>
									<image class="settimg" :src="ossPath + '/upload/1712643970805552.png'"></image>
								</view>
							</view>
						</view>
						<view class="info_editor" v-if="user.IsAuth == 0">
							<view class="register_btn" @click="nav_to('/pages/start/start2')">
								<view class="starttitle">注册账号</view>
								<image class="goimg" :src="ossPath + '/upload/17116951192111464.png'"></image>
							</view>
						</view>
					</view>
					<view class="lin1 mt40">
						<view class="lin1_item" @click="user.IsAuth == 0 ? nav_to('/pages/start/start2') : nav_to('/pages/court/score')">
							<!-- <image
								class="signTips"
								src="https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17201472523281370.png"
								mode="widthFix"
							></image> -->
							<view class="num f1 c1">{{ userNums.Score || 0 }}</view>
							<view class="lab f2 c2">积分</view>
						</view>
						<view class="lin1_item" @click="user.IsAuth == 0 ? nav_to('/pages/start/start2') : nav_to('/pages/friend/friend_list')">
							<view class="num f1 c1">
								{{ friendNum }}
								<text class="numVal" v-if="newNum">{{ newNum }}</text>
							</view>
							<view class="lab f2 c2">好友</view>
						</view>
						
						<view class="lin1_item" @click="user.IsAuth == 0 ? nav_to('/pages/start/start2') : nav_to('/pages/user/visitor_list')">
							<view class="num f1 c1">{{ BrowserNum || 0 }}</view>
							<view class="lab f2 c2">访客</view>
							<view class="horn_mark" v-if="newVisitorCount > 0">
								{{ newVisitorCount > 99 ? '99+' : newVisitorCount }}
							</view>
						</view>
						<view class="lin1_item" @click="user.IsAuth == 0 ? nav_to('/pages/start/start2') : nav_to('/pages/user/integral')">
							<view class="num f1 c1">{{ userNums.Commission || 0 }}</view>
							<view class="lab f2 c2">礼物</view>
						</view>
					</view>
				</view>
				<view v-if="user.UserType == '普通用户'" class="vipbox">
					<view class="vipimgbox">
						<image class="vipimg" :src="ossPath + '/upload/1711003946324159.png'"></image>
						<text class="viptext">会员专享福利</text>
					</view>
					<view class="context">加好友、加微信、定制运动等权限</view>
					<view @click="sub" class="vipbutton">
						<text class="vipcon">首充6折</text>
						<image class="rimg" :src="ossPath + '/upload/1711003960492543.png'"></image>
					</view>
				</view>
				<view v-if="user.UserType == '体验会员'" class="vipbox1">
					<view class="vipimgbox">
						<image class="vipimg" :src="ossPath + '/upload/1711010269728487.png'"></image>
						<text class="viptext">体验金卡</text>
					</view>
					<view class="context">加好友、加微信、定制运动等权限</view>
					<view @click="sub" class="vipbutton">
						<text class="vipcon">首充6折</text>
						<image class="rimg" :src="ossPath + '/upload/1711003960492543.png'"></image>
					</view>
				</view>
				<view v-if="user.UserType == '月卡会员'" class="vipbox2">
					<view class="vipimgbox">
						<image class="vipimg" :src="ossPath + '/upload/1711010269728487.png'"></image>
						<text class="viptext">月卡会员</text>
					</view>
					<view class="context">加好友、加微信、定制运动等权限</view>
					<view @click="sub" class="vipbutton">
						<text class="vipcon">会员续费</text>
						<image class="rimg" :src="ossPath + '/upload/1711003960492543.png'"></image>
					</view>
				</view>
				<view v-if="user.UserType == '金卡会员'" class="vipbox2">
					<view class="vipimgbox">
						<image class="vipimg" :src="ossPath + '/upload/1744792231023643.png'"></image>
						<text class="viptext">金卡会员</text>
					</view>
					<view class="context">加好友、加微信、定制运动等权限</view>
					<view @click="sub" class="vipbutton">
						<text class="vipcon">会员续费</text>
						<image class="rimg" :src="ossPath + '/upload/1711003960492543.png'"></image>
					</view>
				</view>
				<view v-if="user.UserType == '年卡会员'" class="vipbox3">
					<view class="vipimgbox">
						<image class="vipimg" :src="ossPath + '/upload/17110103973551137.png'"></image>
						<text class="viptext">年卡会员</text>
					</view>
					<view class="context">加好友、加微信、定制运动等权限</view>
					<view @click="sub" class="vipbutton">
						<text class="vipcon">会员续费</text>
						<image class="rimg" :src="ossPath + '/upload/1711003960492543.png'"></image>
					</view>
				</view>
				<view v-if="user.UserType == '黑金卡会员'" class="vipbox3">
					<view class="vipimgbox">
						<image class="vipimg" :src="ossPath + '/upload/17110103973551137.png'"></image>
						<text class="viptext">年卡会员</text>
					</view>
					<view class="context">加好友、加微信、定制运动等权限</view>
					<view @click="sub" class="vipbutton">
						<text class="vipcon">会员续费</text>
						<image class="rimg" :src="ossPath + '/upload/1711003960492543.png'"></image>
					</view>
				</view>
				<view v-if="user.UserType == '黑金年卡会员'" class="vipbox4">
					<view class="vipimgbox">
						<image class="vipimg" :src="ossPath + '/upload/1744792207318376.png'"></image>
						<text class="viptext">黑卡</text>
					</view>
					<view class="context">加好友、加微信、定制运动等权限</view>
					<view @click="sub" class="vipbutton">
						<text class="vipcon">会员续费</text>
						<image class="rimg" :src="ossPath + '/upload/1711003960492543.png'"></image>
					</view>
				</view>
				<view class="myusebox">
					<view @click="mysub(item, index)" class="myuse" v-for="(item, index) in myuser" :key="index">
						<image class="myuseimg" :src="item.Icon"></image>
						<view class="usetext">{{ item.Name }}</view>
					</view>
					<!-- <view class="count_news" v-if="newVisitorCount > 0">
						{{ newVisitorCount > 99 ? '+99' : newVisitorCount }}
					</view> -->
				</view>
				<view class="nav_list">
					<view class="Techntext">圈主管理</view>
					<view class="nav_item" @click="goMyTeam()">
						<view class="nav_box">
							<image
								class="nav_img"
								src="https://wavestation.oss-cn-shenzhen.aliyuncs.com/upload/1720231475686251.png"
								mode="widthFix"
							></image>
							<view class="nav_text">我的圈子</view>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'" mode="widthFix"></image>
					</view>
					<!-- <view class="nav_item" @click="goCiradd()">
						<view class="nav_box">
							<image
								class="nav_img"
								src="https://wavestation.oss-cn-shenzhen.aliyuncs.com/upload/1720231475686251.png"
								mode="widthFix"
							></image>
							<view class="nav_text">创建圈子</view>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'" mode="widthFix"></image>
					</view> -->
					<view class="nav_main">
						<view class="nav_item" @click="isNavTo('/pages/ball/ball_list_user?title=活动管理&index=0')">
							<view class="nav_box">
								<image
									class="nav_img"
									src="https://wavestation.oss-cn-shenzhen.aliyuncs.com/upload/17183523884701123.png"
									mode="widthFix"
								></image>
								<view class="nav_text">活动管理</view>
							</view>
							<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'" mode="widthFix"></image>
						</view>
						<view class="nav_item" @click="isNavTo('/pages/together/cir_commis')">
							<view class="nav_box">
								<image
									class="nav_img"
									src="https://wavestation.oss-cn-shenzhen.aliyuncs.com/upload/17202314930351045.png"
									mode="widthFix"
								></image>
								<view class="nav_text">圈主收益</view>
							</view>
							<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'" mode="widthFix"></image>
						</view>
					</view>
				</view>
				
				<view class="nav_list">
					<!-- <view class="nav_item" @click="isNavTo('/pages/together/to_order')">
						<view class="nav_box">
							<image
								class="nav_img"
								src="https://wavestation.oss-cn-shenzhen.aliyuncs.com/upload/17183523884701123.png"
								mode="widthFix"
							></image>
							<view class="nav_text">活动订单</view>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'" mode="widthFix"></image>
					</view> -->
					<view class="nav_item" @click="user.IsAuth == 0 ? nav_to('/pages/start/start2') : nav_to('/pages/user/spread')">
						<view class="nav_box">
							<image class="nav_img" :src="ossPath + '/upload/1729242631073803.png'"></image>
							<view class="nav_text">邀请推广</view>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'"></image>
					</view>
					<view class="nav_item" @click="nav_to('/pages/user/settings')">
						<view class="nav_box">
							<image class="nav_img" :src="ossPath + '/upload/17308652397671145.png'"></image>
							<view class="nav_text">系统设置</view>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'"></image>
					</view>
					<!-- <view class="nav_item" @click="nav_to('/pages/court/mycoupon')">
						<view class="nav_item_icon">
							<uni-icons type="map" size="24" color="#ec5352"></uni-icons>
						</view>
						<view class="f2 con" style="color: #333333; font-size: 28rpx">用户福利</view>
						<view class="arr_r">
							<uni-icons color="#A8A8AB" type="right" size="14"></uni-icons>
						</view>
					</view> -->
					<view class="nav_item" v-if="IsManager" @click="nav_to('/pages/manage/main')">
						<view class="nav_box">
							<image class="nav_img" :src="ossPath + '/upload/1730865223562896.png'"></image>
							<view class="nav_text">平台运营</view>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'"></image>
					</view>
					<!-- #ifdef MP-WEIXIN -->
					<!-- <view class="nav_item" @click="nav_to('/pages/other/app_help')">
						<view class="nav_box">
							<image class="nav_img" :src="ossPath+'/upload/1711012045486735.png'"></image>
							<button class="nav_text" type="default">
								动魅 APP
							</button>
						</view>
						<image class="rimg" :src="ossPath+'/upload/1711011951088796.png'"></image>
					</view> -->
					<view class="nav_item">
						<view class="nav_box">
							<image class="nav_img" :src="ossPath + '/upload/1729242586826849.png'"></image>
							<button
								style="background-color: transparent"
								hover-class="none"
								class="nav_text f2 c1 con contact"
								type="default"
								open-type="contact"
							>
								联系客服
							</button>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'"></image>
					</view>
					<!-- #endif -->
					<!-- #ifdef APP-PLUS -->
					<!-- <view class="nav_item">
						<view class="nav_box">
							<image :src="ossPath+'/upload/1711012045486735.png'"></image>
							<button class="nav_text" type="default">
								APP版本号
							</button>
						</view>
						<view class="arr_r">
							<text>V1.5.43</text>
						</view>
					</view> -->
					<view class="nav_item" @click="call_server('19849484540')">
						<view class="nav_box">
							<image class="nav_img" :src="ossPath + '/upload/1729242586826849.png'"></image>
							<button class="nav_text" type="default" open-type="contact">联系客服</button>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'"></image>
					</view>
		
					<view class="nav_item" @click="logout">
						<view class="nav_box">
							<image class="nav_img" :src="ossPath + '/upload/1711012167726424.png'"></image>
							<view class="nav_text">退出登录</view>
						</view>
						<image class="rimg" :src="ossPath + '/upload/1711011951088796.png'"></image>
					</view>
					<!-- #endif -->
					<view style="height: 350rpx"></view>
				</view>
			</x-scroll>
		</view>
	</view>
	
	
</template>

<script>
import topStatus from "@/components/topStatus/topStatus.vue";
export default {
	tabTop: 0,
	components: {	
		topStatus
	},
	data() {
		return {
			isspread: false,
			BrowserNum: 0,
			myID: null,
			isModal: false,

			friendNum: 0,
			IsExpiredUser: {},
			newNum: 0,
			IsTrueName: false,
			userNums: {},
			_freshing: true,
			load: false,
			user: {},

			IsManager: false,

			lastTime: 0,
			groupList: [],
			list: [],
			userList: [], //群聊成员
			jioner: {}, //加入群聊新人

			newVisitorCount: 0,
			myuser: [
				{
					src: 'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711005211456215.png',
					text: '运动圈',
					goto: '/pages/album/dynamic',
					id: 1,
				},
				{
					src: 'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17308805060111102.png',
					text: '我的活动',
					goto: '/pages/together/to_order',
					id: 2,
				},
				{
					src: 'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711005240937487.png',
					text: '我的主页',
					goto: `/pages/user/user_visitor`,
					id: 3,
				},
				{
					src: 'https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711005256195193.png',
					text: '谁看过我',
					goto: '/pages/user/visitor_list',
					id: 4,
				},
			],
			ossPath: null,
			myCirList: [],
			fixboxHeight:88
		};
	},
	computed: {
		getDay() {
			return (l) => {
				//console.log(l);
				let d = new Date(l);
				let timestamp = d.getTime();

				return this.$u.date(timestamp, 'yyyy-mm-dd');
			};
		},
	},
	onLoad() {
		
		this.page_load();
		this.myID = uni.getStorageSync('user').UserID;
		if (uni.getStorageSync('isspread')) {
			this.isspread = uni.getStorageSync('isspread');
		}
		console.log(this.isspread);
		uni.$on("sendCirMy",()=>{
			setTimeout(()=>{
				uni.showModal({
					title:'提示',
					content:'圈子创建成功，马上去发布活动~',
					success: (res) => {
						if(res.confirm){
							uni.$emit('sendCir','my')
							uni.switchTab({
								url: '/pages/tab/circle'
							});
						}
					}
				})				
			},100)
			
		})
	},
	onReady() {
		uni.setNavigationBarColor({
			frontColor: '#000000',
			backgroundColor: '#ffffff',
			animation: {
				duration: 400,
				timingFunc: 'easeIn',
			},
		});
	},
	onShow() {
		this.getUserInfo();
		this.getHeight()
		this.init();
		this.$store.dispatch('getMyNum')
		this.ossPath = this.$ossPath;
	},
	onUnload() {
		uni.$off("sendCirMy");
	},
	methods: {
		getHeight() {
		  let that = this;
		  setTimeout(() => {
		    const query = uni.createSelectorQuery().in(that);
		    query.select('.fix').boundingClientRect(data => {
		      if (data) {
		        // data.height 就是元素的高度
		        that.fixboxHeight = data.height;
		      }
		    }).exec();
		  }, 500);
		
		},
		isNavTo(url) {
			if (this.user.IsAuth != 1) {
				this.nav_to('/pages/start/start2');
			} else {
				this.nav_to(url);
			}
		},
		// 获取我创建的圈子信息
		async getMycirInfo() {
			let res = await this.$api.post('Team/MyCreateTeam');
			if (res.code == 0) {
				this.myCirList = res.data || [];
			}
		},
		goCiradd() {
			if (this.user.IsAuth != 1) {
				this.nav_to('/pages/start/start2');
			} else {
				if (this.myCirList.length >= 3) {
					this.$pv.msg('您最多只能创建3个圈子');
				} else {
					this.nav_to('/pages/together/cir_add?type=my');
				}
			}
		},
		goMyTeam(){
			if (this.user.IsAuth != 1) {
				this.nav_to('/pages/start/start2');
			} else {
				this.nav_to('/pages/together/myTeam');
			}
		},
		async uploadingList(url, tempKey, timeStamp) {
			this.$pv.load('正在上传');
			const r = await this.$upload(url);
			this.$pv.closeLoad('');
			return r;
		},
		delspr() {
			this.isspread = true;
			uni.setStorageSync('isspread', this.isspread);
		},
		//用户应用
		mysub(item, index) {
			if (this.user.IsAuth == 0) {
				this.$pv.msg('请先注册');
				setTimeout(() => {
					this.nav_to('/pages/start/start2');
				}, 500);
			} else if (index == 2) {
				this.nav_to(`${item.URL}?id=${this.myID}`);
			} else {
				this.nav_to(item.URL);
			}
		},
		//未注册用户跳注册页面
		sub() {
			if (this.user.IsAuth == 0) {
				this.$pv.msg('请先注册');
				setTimeout(() => {
					this.nav_to('/pages/start/start2');
				}, 500);
			} else {
				this.nav_to('/pages/user/apply_member');
			}
		},
		//下拉刷新
		async onRefresh() {},
		//滚动到底部触发
		async scrolltolower() {},

		async getIsExpiredUser() {
			if(this.user && this.user.IsAuth==1){
				let res = await this.$api.post('User/IsExpiredUser');
				if (res.data == null) {
					res.data = {};
				}
				this.IsExpiredUser = res.data;
			}
			
		},

		async init() {
			this.load = true;
			let bro = await this.$api.post('/Member/BrowseMySelfNum');
			this.BrowserNum = bro.data || 0;
			this.getIsExpiredUser();

			let res = await this.$api.post('Company/IsCompanyAdmin');
			if (res.data) this.IsManager = true;

			let v_d = await this.$api.post('/Member/BrowseMySelfNum');
			let tmp_brower_num = 0;

			if (v_d.data) {
				tmp_brower_num = v_d.data;

				let local_num = uni.getStorageSync('BrowserNum');

				this.newVisitorCount = tmp_brower_num - local_num;
			}

			//用户应用
			let res2 = await this.$api.post('Module/List', {
				Type: 1,
				CompanyID: 6003,
			});
			// res2.data.map((item) => {
			// 	this.myuser.map((list, index) => {
			// 		if (item.ID == list.id) {
			// 			this.myuser[index] = {
			// 				...list,
			// 				...item
			// 			}
			// 		}
			// 	})
			// })
			// this.myuser = [...this.myuser]
			this.myuser = res2.data;
			this.myuser.forEach(item=>{
				if(item.ID==1014){
					item.URL = `/pages/user/user_visitor?id=${uni.getStorageSync('user').UserID}`
				}
			})
			
			console.log('=>>>>>>>>>>>>>>>>>>>>>',this.myuser);
		},
		async page_load() {
			await this.$api.post('/Common/Add_ViewPath', {
				Path: 'my',
				Platform: uni.getStorageSync('platform'),
			});
		},

		async getSaleChannelDetail() {
			let res = await this.$api.post('/SaleChannel/SaleChannelDetail', {
				CompanyID: 6003,
			});
			if (res.code == 0) {
				this.userNums = res.data;
			}
		},
		call_server(mobile) {
			uni.makePhoneCall({
				phoneNumber: mobile,
				// 成功回调
				success: (res) => {
					// console.log('调用成功!')
				}, // 失败回调
				fail: (res) => {
					// console.log('调用失败!')
				},
			});
		},
		async getFriendNum() {
			let res = await this.$api.post('/Friend/MyFriends');
			this.friendNum = res.data.length || 0;

			let res2 = await this.$api.post('/Friend/PendingApply');
			this.newNum = res2.data.length || 0;
		},
		async getUserInfo() {
			let u = uni.getStorageSync('user');
			let res = await this.$api.post('User/GetUserInfo', {
				ID: u.UserID,
			});

			this.user = res.data;
			this.IsTrueName = res.data.IsTrueName;

			uni.setStorageSync('user', this.user);

			this.$store.commit('setUser', this.user);

			this.getSaleChannelDetail();

			this.getFriendNum();
		},
		logout() {
			const _this = this;
			uni.showActionSheet({
				title: '是否确认退出？',
				itemList: ['退出登录'],
				async success(res) {
					if (res.tapIndex == 0) {
						uni.removeStorageSync('xj_token');
						uni.removeStorageSync('user');
						_this.$store.commit('setUser', {});
						_this.$store.commit('login', false);
						uni.reLaunch({
							url: '/pages/start/isLogin',
						});
					}
				},
			});
		},
	}
};
</script>

<style lang="scss">
page {
	background-color: #fdf4ff;
}
.fixbox {
	
  .fix {
    position: sticky;
    background-image: linear-gradient(180deg, #c9ceff 0%, #fdf4ff 100%);
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
  }
  
  .tabs {
    box-sizing: border-box;
    z-index: 200;
    height: 44px;
    width: 750rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32rpx;
    font-weight: bold;
  }
}
.nav_item_icon {
	margin-right: 20rpx;
}
// .nav_main {
// 		border-radius: 8rpx;
// 		overflow: hidden;
// 		width: 702rpx;
// 		margin: 0 24rpx;
// 		margin-bottom: 16rpx;
// 	}

.Techntext {
	width: 702rpx;
	font-size: 32rpx;
	color: #333333;
	font-weight: bold;
	background-color: #fff;
	margin-left: 24rpx;
	padding-left: 30rpx;
	padding-top: 20rpx;
}
button {
	text-align: left !important;
	height: 40rpx;
	display: flex;
	align-items: center;
	background-color: transparent;
}

button::after {
	border-radius: 0 !important;
	border: 0 !important;
}

.f2 {
	font-size: 34rpx;
}

.f1 {
	font-size: 34rpx;
}

.heimgbox {
	width: 100vw;
	height: 100vh;
	background-color: #000000;
	position: absolute;
	top: 0;
	left: 0;
	.heimg {
		width: 100%;
		height: 100%;
		display: block;
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		margin: auto;
	}
	.hebtn {
		flex-shrink: 0;
		width: 280rpx;
		height: 88rpx;
		border-radius: 44px;
		border: 1px solid #fff;
		text-align: center;
		line-height: 88rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		color: #fff;
		font-size: 32rpx;
		font-weight: bold;
		position: absolute;
		bottom: 2%;
		left: 50%;
		transform: translateX(-50%);
	}
}
.wap {
	// background-image: url('https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711595548965583.png');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
}
.user_info {
	padding-top: 44rpx;
	display: flex;

	.cover {
		flex-shrink: 0;
		height: 112rpx;
		width: 112rpx;
		margin-right: 10rpx;
		position: relative;
		margin-left: 26rpx;
		.userimg {
			height: 100%;
			width: 100%;
			border-radius: 50%;
		}
		.coachbox {
			position: absolute;
			left: 2rpx;
			bottom: -22rpx;
			.coachimg {
				width: 92rpx;
				height: 36rpx;
			}
		}
		.assbox {
			position: absolute;
			left: 2rpx;
			bottom: -22rpx;
			.assistantimg {
				width: 92rpx;
				height: 36rpx;
			}
		}
	}
	.signature {
		display: flex;
		align-items: center;
		.vID {
			font-size: 28rpx;
			color: #666666;
			margin-right: 10rpx;
		}
		.qr_b {
			width: 36rpx;
			height: 36rpx;
			margin-right: 8rpx;
			.qr_bimg {
				width: 100%;
				height: 100%;
			}
		}
	}
	.name {
		display: flex;
		align-items: center;
		margin-bottom: 20rpx;

		.name_text {
			margin-right: 5rpx;
			color: #333333;
		}

		.real {
			display: flex;
			align-items: center;
			.realimg {
				width: 99rpx;
				height: 33rpx;
				margin-right: 8rpx;
			}
		}
	}

	.info {
		padding-left: 20rpx;
		flex: 1;
	}
	.authenticabox {
		width: 112rpx;
		height: 48rpx;
		border-radius: 24rpx;
		border: 1rpx solid #95969b;
		// padding: 0 10rpx;
		box-sizing: border-box;
		text-align: center;
		display: flex;
		// justify-content: space-around;
		align-items: center;
		margin-right: 12rpx;
		.autext {
			// margin-top: 5rpx;
			margin-left: 25rpx;
			font-size: 24rpx;
			color: #333333;
		}
		.auimg {
			width: 14rpx;
			height: 34rpx;
		}
	}

	.huiyuanbox {
		width: 144rpx;
		height: 48rpx;
		position: relative;
		text-align: center;
		margin-right: 5rpx;
		.vipiconimg {
			width: 144rpx;
			height: 48rpx;
			vertical-align: middle;
		}
	}
	.dengji {
		width: 112rpx;
		height: 48rpx;
		// border-radius: 1rpx;
		text-align: center;
		line-height: 32rpx;
		margin-right: 10rpx;
		position: relative;
		// background: linear-gradient(180deg, #FEF0BC 0%, #B98B51 100%);
		.dengjiimg {
			width: 112rpx;
			height: 48rpx;
		}
		.Wealthtext {
			position: absolute;
			top: 8rpx;
			left: 47rpx;
			color: #381f0b;
			font-size: 22rpx;
			font-weight: 600;
		}
	}
	.assbox {
		width: 84rpx;
		height: 40rpx;
		border-radius: 10rpx;
		text-align: center;
		line-height: 36rpx;
		background: linear-gradient(180deg, #cb5bcd 0%, #ba5bd8 100%);
		.autext {
			font-size: 24rpx;
			color: #fff;
		}
	}

	.number {
		height: 64rpx;
		display: flex;
		align-items: center;
	}
}

.info_editor {
	display: flex;
	align-items: center;
}

.setting_btn {
	flex-shrink: 0;
	width: 160rpx;
	height: 48rpx;
	border-radius: 25px;
	border: 1px solid #95969b;
	text-align: center;
	line-height: 48rpx;
	display: flex;
	justify-content: center;
	align-items: center;
	text {
		font-size: 24rpx;
		color: #333333;
	}
	.settimg {
		width: 14rpx;
		height: 34rpx;
		vertical-align: middle;
	}
}

.register_btn {
	display: flex;
	align-items: center;
	.starttitle {
		font-size: 36rpx;
		color: #333333;
		font-weight: 600;
		margin-left: 20rpx;
		margin-right: 5rpx;
	}
	.goimg {
		width: 32rpx;
		height: 32rpx;
	}
}

.lin1 {
	display: flex;
	align-items: center;

	.lin1_item {
		flex: 1;
		position: relative;
		.horn_mark{
			position: absolute;
			top: 0rpx;
			right: 20rpx;
			min-width: 30rpx;
			height: 30rpx;
			padding: 0 10rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: #dd524d;
			color: #fff;
			font-size: 22rpx !important;
			border-radius: 100rpx;
		}
		.num {
			font-size: 42rpx;
			color: #333333;
		}

		.num {
			color: #333333;
			font-weight: 600;
			font-size: 42rpx;
			text-align: center;
		}
		.lab {
			color: #666666;
			font-size: 24rpx;
			text-align: center;
			margin-bottom: 20rpx;
		}
		.num {
			position: relative;
			font-size: 42rpx;
			margin-bottom: 10rpx;
			font-weight: bold;
			color: #333333;
		}
		.numVal {
			position: absolute;
			top: -10rpx;
			right: 45rpx;
			height: 40rpx;
			width: 40rpx;
			border-radius: 50%;
			background: #fd4c61;
			display: flex;
			justify-content: center;
			align-items: center;
			font-size: 14px;
			color: #fff;
		}
		.signTips {
			position: absolute;
			right: -18rpx;
			top: -24rpx;
			width: 86rpx;
		}
	}
}
.vipbox {
	width: 702rpx;
	height: 148rpx;
	background-image: url('https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711003831143208.png');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	position: relative;
	margin: 17rpx 24rpx;
	padding: 24rpx 20rpx;
	box-sizing: border-box;
	.vipimgbox {
		display: flex;
		align-items: center;
		margin-bottom: 10rpx;
		.vipimg {
			width: 44rpx;
			height: 44rpx;
			margin-right: 10rpx;
		}
		.viptext {
			font-size: 32rpx;
			color: #ffe4a8;
			font-weight: 600;
		}
	}
	.context {
		font-size: 24rpx;
		color: #d9b777;
	}
	.vipbutton {
		position: absolute;
		right: 32rpx;
		bottom: 42rpx;
		width: 194rpx;
		height: 64rpx;
		// padding: 10rpx 35rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		background: linear-gradient(90deg, #e9ce99 0%, #dab36c 100%);
		display: flex;
		justify-content: center;
		align-items: center;
		.vipcon {
			font-size: 28rpx;
			font-weight: 600;
			color: #381f0b;
			margin-right: 4rpx;
		}
		.rimg {
			width: 20rpx;
			height: 24rpx;
			vertical-align: middle;
		}
	}
}
.vipbox1 {
	width: 702rpx;
	height: 148rpx;
	background-image: url('https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711009564206713.png');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	position: relative;
	margin: 17rpx 24rpx;
	padding: 24rpx 20rpx;
	box-sizing: border-box;
	.vipimgbox {
		display: flex;
		align-items: center;
		margin-bottom: 10rpx;
		.vipimg {
			width: 44rpx;
			height: 44rpx;
			margin-right: 10rpx;
		}
		.viptext {
			font-size: 32rpx;
			color: #381f0b;
			font-weight: 600;
		}
	}
	.context {
		font-size: 24rpx;
		color: #381f0b;
	}
	.vipbutton {
		position: absolute;
		right: 32rpx;
		bottom: 42rpx;
		width: 194rpx;
		height: 64rpx;
		// padding: 10rpx 26rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		background: linear-gradient(90deg, #e9ce99 0%, #dab36c 100%);
		display: flex;
		justify-content: center;
		align-items: center;
		.vipcon {
			font-size: 28rpx;
			font-weight: 600;
			color: #381f0b;
			margin-right: 4rpx;
		}
		.rimg {
			width: 20rpx;
			height: 24rpx;
			vertical-align: middle;
		}
	}
}
.vipbox2 {
	width: 702rpx;
	height: 148rpx;
	background-image: url('https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711009564206713.png');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	position: relative;
	margin: 17rpx 24rpx;
	padding: 24rpx 20rpx;
	box-sizing: border-box;
	.vipimgbox {
		display: flex;
		align-items: center;
		margin-bottom: 10rpx;
		.vipimg {
			width: 44rpx;
			height: 44rpx;
			margin-right: 10rpx;
		}
		.viptext {
			font-size: 32rpx;
			color: #381f0b;
			font-weight: 600;
		}
	}
	.context {
		font-size: 24rpx;
		color: #381f0b;
	}
	.vipbutton {
		position: absolute;
		right: 32rpx;
		bottom: 42rpx;
		width: 194rpx;
		height: 64rpx;
		// padding: 10rpx 26rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		background: linear-gradient(90deg, #e9ce99 0%, #dab36c 100%);
		display: flex;
		justify-content: center;
		align-items: center;
		.vipcon {
			font-size: 28rpx;
			color: #381f0b;
			margin-right: 4rpx;
			font-weight: 600;
		}
		.rimg {
			width: 20rpx;
			height: 24rpx;
			vertical-align: middle;
		}
	}
}
.vipbox3 {
	width: 702rpx;
	height: 148rpx;
	background-image: url('https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/1711010629770145.png');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	position: relative;
	margin: 17rpx 24rpx;
	padding: 24rpx 20rpx;
	box-sizing: border-box;
	.vipimgbox {
		display: flex;
		align-items: center;
		margin-bottom: 10rpx;
		.vipimg {
			width: 44rpx;
			height: 44rpx;
			margin-right: 10rpx;
		}
		.viptext {
			font-size: 32rpx;
			color: #fcf0da;
			font-weight: 600;
		}
	}
	.context {
		font-size: 24rpx;
		color: #fcf0da;
	}
	.vipbutton {
		position: absolute;
		right: 32rpx;
		bottom: 42rpx;
		width: 194rpx;
		height: 64rpx;
		// padding: 10rpx 26rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		background: linear-gradient(90deg, #e9ce99 0%, #dab36c 100%);
		display: flex;
		justify-content: center;
		align-items: center;
		.vipcon {
			font-size: 28rpx;
			color: #381f0b;
			margin-right: 4rpx;
			font-weight: 600;
		}
		.rimg {
			width: 20rpx;
			height: 24rpx;
			vertical-align: middle;
		}
	}
}
.vipbox4 {
	width: 702rpx;
	height: 148rpx;
	background-image: url('https://golfdate.oss-cn-shenzhen.aliyuncs.com/upload/17110106912871052.png');
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center;
	position: relative;
	margin: 17rpx 24rpx;
	padding: 24rpx 20rpx;
	box-sizing: border-box;
	.vipimgbox {
		display: flex;
		align-items: center;
		margin-bottom: 10rpx;
		.vipimg {
			width: 44rpx;
			height: 44rpx;
			margin-right: 10rpx;
		}
		.viptext {
			font-size: 32rpx;
			color: #ffe4a8;
			font-weight: 600;
		}
	}
	.context {
		font-size: 24rpx;
		color: #d9b777;
	}
	.vipbutton {
		position: absolute;
		right: 32rpx;
		bottom: 42rpx;
		width: 194rpx;
		height: 64rpx;
		// padding: 10rpx 26rpx;
		box-sizing: border-box;
		border-radius: 32rpx;
		background: linear-gradient(90deg, #e9ce99 0%, #dab36c 100%);
		display: flex;
		justify-content: center;
		align-items: center;
		.vipcon {
			font-size: 28rpx;
			color: #381f0b;
			margin-right: 4rpx;
			font-weight: 600;
		}
		.rimg {
			width: 20rpx;
			height: 24rpx;
			vertical-align: middle;
		}
	}
}
.myusebox {
	display: flex;
	justify-content: space-around;
	align-items: center;
	background-color: #fff;
	border-radius: 16rpx;
	width: 702rpx;
	height: 186rpx;
	margin: 22rpx 24rpx;
	position: relative;
	.myuse {
		text-align: center;
		.myuseimg {
			width: 80rpx;
			height: 80rpx;
			margin-bottom: 5rpx;
		}
		.usetext {
			font-size: 24rpx;
			color: #666666;
		}
	}
	.count_news {
		width: 36rpx;
		height: 36rpx;
		border-radius: 18rpx;
		font-size: 24rpx;
		color: #fff;
		background-color: #fd4c61;
		display: flex;
		justify-content: center;
		align-items: center;
		position: absolute;
		top: 25rpx;
		right: 40rpx;
	}
}
.nav_list {
	margin-top: 30rpx;
	.nav_item {
		width: 702rpx;
		height: 96rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		box-sizing: border-box;
		padding: 10rpx 24rpx;
		background-color: #fff;
		margin-left: 24rpx;
		.nav_box {
			display: flex;
			flex: 1;
			.nav_item_icon {
				width: 48rpx;
				height: 48rpx;
				margin-right: 20rpx;
			}
			.nav_img {
				width: 48rpx;
				height: 48rpx;
				margin-right: 20rpx;
			}
			.nav_text {
				font-size: 28rpx;
				color: #333333;
			}
		}
		.rimg {
			width: 32rpx;
			height: 32rpx;
		}
		.arr_r {
		}

		// &::after {
		// 	position: absolute;
		// 	bottom: 0;
		// 	right: 0;
		// 	left: 0;
		// 	height: 2rpx;
		// 	content: '';
		// 	transform: scaleY(.6);
		// 	background-color: #404040;
		// }

		.new_ad {
			color: #ffff00;
		}

		&.number:after {
			height: 0;
		}

		.con {
			flex: 1;
			// padding-left: 12rpx;
		}

		.icon {
			height: 40rpx;
			width: 40rpx;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}

	.number {
		background: linear-gradient(90deg, #212121 0%, #313131 100%);
		box-shadow: 0px 6rpx 16rpx 0px rgba(0, 0, 0, 0.5);
		border-radius: 8rpx;
		border: 2rpx solid #4a4a4a;
		margin-left: 32rpx;
		margin-right: 32rpx;
		padding-left: 24rpx;
		padding-right: 24rpx;
	}
}

.mt40 {
	margin-top: 40rpx;
}
.user_tips1 {
	text-align: center;
	line-height: 54rpx;
	color: #ff5722;
	position: relative;
	font-size: 24rpx;
	image {
		width: 25rpx;
		height: 25rpx !important;
		position: absolute;
		top: 16rpx;
		right: 40rpx;
	}
}
.user_tips {
	border: 1px solid rgba(253, 249, 246, 0.4);
	text-align: center;
	line-height: 54rpx;
	color: #b6722e;

	font-size: 24rpx;
}
</style>
